<template>
  <section
    @click="clickCurrent('current')"
    @mousedown="clickCurrent('dragging')"
  >
    <div :class="['custorm--modelbox', 'text-show', (custormCurrent == custormIndex)?'drag active':'drag']">
      <div
        v-if="custormItemData.params.isshow == '2'"
        class="noshow"
        v-bind:style="{'background-image':`url(${getPath('noshow.png')})`}"
      ></div>
      <div
        style="overflow: hidden;"
        v-if="custormItemData.style.display == '1'"
      >
        <div
          class="es-title title1"
          :style="{'font-size': `${custormItemData.style.font_size}px`}"
        >
          <div class="flex-row flex-justify-b flex-align-c">
            <div class="title-content">
              <div
                class="main-title"
                :style="{'color':custormItemData.style.color}"
              >{{custormItemData.params.text}}</div>
            </div>
          </div>
        </div>
      </div>
      <div
        class="btn-edit-del"
        @click="delCurrent"
      ><span class="btn-del iconfont icon icon-close"></span></div>
    </div>
  </section>
</template>

<script>
import defaultConfig from './utils/showConfig'
export default {
  mixins: [defaultConfig.mixins],
  props: {
    defaultConfig: {
      type: Object,
      default: function() {
        return defaultConfig
      }
    }
  },
  methods: {

  }
}
</script>

<style lang="scss" scoped>
.custorm--modelbox.text-show {
  .es-title,
  .es-title.title2,
  .es-title.title12,
  .es-title.title13 {
    position: relative;
  }

  .es-title.title1 .title,
  .es-title.title12 .title,
  .es-title.title13 .title {
    padding: 0 10px;
    position: relative;
    background: #fff;
    z-index: 2;
  }
}
</style>
